package com.zy.je.common.core.utils.lang;

import java.io.Serializable;
import java.util.function.BiFunction;
import java.util.function.Function;

public class Fn {

    @FunctionalInterface
    public interface Fn1<P1, R> extends Function<P1, R>, Serializable {
    }

    @FunctionalInterface
    public interface Fn2<P1, P2, R> extends BiFunction<P1, P2, R>, Serializable {
    }

    @FunctionalInterface
    public interface Fn3<P1, P2, P3, R> extends Serializable {
        R apply(P1 p1, P2 p2, P3 p3);
    }

    @FunctionalInterface
    public interface Fn4<P1, P2, P3, P4, R> extends Serializable {
        R apply(P1 p1, P2 p2, P3 p3, P4 p4);
    }

    @FunctionalInterface
    public interface Fn5<P1, P2, P3, P4, P5, R> extends Serializable {
        R apply(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5);
    }

    @FunctionalInterface
    public interface Fn6<P1, P2, P3, P4, P5, P6, R> extends Serializable {
        R apply(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6);
    }

    @FunctionalInterface
    public interface Fn7<P1, P2, P3, P4, P5, P6, P7, R> extends Serializable {
        R apply(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7);
    }

    @FunctionalInterface
    public interface Fn8<P1, P2, P3, P4, P5, P6, P7, P8, R> extends Serializable {
        R apply(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8);
    }

    @FunctionalInterface
    public interface Fn9<P1, P2, P3, P4, P5, P6, P7, P8, P9, R> extends Serializable {
        R apply(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9);
    }
}
